<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>人员添加页面</title>
  <link rel="stylesheet" href="../../yl/index.css" />
  <!-- 布局样式 -->
  <link rel="stylesheet" href="../../yl/style.css" />
  <link rel="stylesheet" href="../../yl/mobile.css" />
  <link rel="stylesheet" href="../../yl/easyui.css" />
  <link rel="stylesheet" href="../../yl/icon.css" />
</head>

<body>
  <!-- <div id="app"> -->
  <div class="easyui-navpanel" id="app" v-cloak>
    <header>
      <div class="m-toolbar">
        <div class="m-title">添加信息</div>
      </div>
    </header>
    <div class="easyui-navpanel panel-body panel-body-nobottom panel-body-noborder" style="height: 3000px"
      id="MainTable" ref="MainTable"
      :data-options="JSON.stringify({ 'TableName': 'personal_information', 'form': 'dataForm','primary_key':'ID_Card_Number' })">
      <div class="yl-main">
        <div class="table_titel">
          <div class="titel">人口信息</div>
        </div>
        <el-form :model="dataForm" ref="form" :inline-message="true" style="width: 100%">
          <el-descriptions :column="1" size="large" border>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">身份证识别</div>
              </template>
              <el-form-item prop="ID_Card_Number" >
                <yl-upload base64 v-model="personal_Image"></yl-upload>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">身份证编号</div>
              </template>
              <el-form-item  prop="ID_Card_Number" :rules="[{ required: true, validator:ID_Validity, trigger: 'blur' }]">
                <el-input @change="InputID_Card_Number" v-model="dataForm.ID_Card_Number" class="borderless-input" placeholder="请输入身份证编号" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">姓名</div>
              </template>
              <el-form-item prop="Personal_Name" :rules="[{ required: true, message: '请输入姓名', trigger: 'blur' }]">
                <el-input v-model="dataForm.Personal_Name" class="borderless-input" placeholder="请输入姓名" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">性别</div>
              </template>
              <el-form-item prop="Gender" :rules="[{ required: true, message: '请选择性别', trigger: 'change' }]">
                <el-select v-model="dataForm.Gender" placeholder="请选择性别" size="large">
                  <el-option v-for="item in ['男','女']" :key="item" :label="item" :value="item" />
                </el-select>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">出生日期</div>
              </template>
              <el-form-item prop="Birthday" :rules="[{ required: true, message: '请选择出生日期', trigger: 'change' }]">
                <el-date-picker v-model="dataForm.Birthday" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
                  class="borderless-input" type="date" placeholder="请选择出生日期" size="large" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">户籍地省/市/区</div>
              </template>
              <el-cascader @change="changeCity" v-model="cityValue" filterable class="borderless-input"
                :props="{value:'value',label:'label',children:'children'}" placeholder="请选择省市区" :options="city"
                style="width: 100%"></el-cascader>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">户籍地乡镇/村庄</div>
              </template>
              <el-cascader :disabled="city1.length == 0" @change="changeCity1" class="borderless-input"
                v-model="cityValue1" filterable :props="{value:'ProvinceNumber',label:'Province',children:'children'}"
                placeholder="请选择乡镇/村庄" :options="city1" style="width: 100%"></el-cascader>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">政治面貌</div>
              </template>
              <el-form-item prop="Political_Affiliation"
                :rules="[{ required: true, message: '请选择政治面貌', trigger: 'change' }]">
                <el-select v-model="dataForm.Political_Affiliation" placeholder="请选择政治面貌" size="large">
                  <el-option v-for="item in Affiliation" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">家庭地址</div>
              </template>
              <el-form-item prop="Home_Address" :rules="[{ required: true, message: '请输入家庭地址', trigger: 'blur' }]">
                <el-input v-model="dataForm.Home_Address" class="borderless-input" placeholder="请输入家庭地址" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">民族</div>
              </template>
              <el-form-item prop="Nation" :rules="[{ required: true, message: '请选择民族', trigger: 'change' }]">
                <el-select v-model="dataForm.Nation" placeholder="请选择民族" size="large">
                  <el-option v-for="item in Nation" :key="item.id" :label="item.name" :value="item.name" />
                </el-select>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">联系电话</div>
              </template>
              <el-form-item prop="Contact_Phone" :rules="[{ required: true, validator:PH_Validity, trigger: 'blur' }]">
                <el-input v-model="dataForm.Contact_Phone" class="borderless-input" placeholder="请输入联系电话" />
              </el-form-item>
            </el-descriptions-item>
            <!-- <el-descriptions-item>
              <template #label>
                <div class="cell-item">是否为流动人口</div>
              </template>
              <el-form-item prop="Flow_Personal">
                <el-select v-model="dataForm.Flow_Personal" placeholder="是否为流动人口" size="large">
                  <el-option v-for="item in [{label:'是',value:'1'},{label:'否',value:'0'}]" :key="item.value" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-descriptions-item> -->
            
          </el-descriptions>
        </el-form>
        <div id="ChildTable">
          <div class="table_titel">
            <div class="titel">受教育情况{{childDataForm.filter(item => item.Row_Status != '1').length == 0?'(暂无数据)':''}}</div>
            <div class="operation">
              <el-button type="primary" size="small" @click="handleAdd('childDataForm')">新增</el-button>
              <el-button type="danger" size="small" @click="handleRemove('childDataForm')">删除</el-button>
            </div>
          </div>
          <el-form :model="{childDataForm}" ref="form1" :inline-message="true" style="width: 100%">
            <el-descriptions
              :data-options="JSON.stringify({ 'TableName': 'personal_education_status', 'form': 'childDataForm', 'ParentTableName': 'personal_information'})"
              :column="2" size="large" border v-for="(item,index) in childDataForm.filter(item => item.Row_Status != '1')"
              :key="index">
              <el-descriptions-item>
                <template #label>
                  <div class="cell-item">毕业学校</div>
                </template>
                <el-form-item :prop="'childDataForm.'+index+'.Graduation_School'"
                  :rules="[{ required: true, message: '请输入毕业学校', trigger: 'blur' }]">
                  <el-input v-model="item.Graduation_School" class="borderless-input" placeholder="请输入毕业学校" />
                </el-form-item>
              </el-descriptions-item>
              <el-descriptions-item>
                <template #label>
                  <div class="cell-item">学历</div>
                </template>
                <el-form-item :prop="'childDataForm.'+index+'.Education'"
                  :rules="[{ required: true, message: '请选择学历', trigger: 'change' }]">
                  <el-select v-model="item.Education" style="width: 100%;" placeholder="请选择学历" size="large">
                    <el-option v-for="(item,index) in Ducation" :key="index" :label="item" :value="item" />
                  </el-select>
                </el-form-item>
              </el-descriptions-item>
              <el-descriptions-item>
                <template #label>
                  <div class="cell-item">专业</div>
                </template>
                <!-- <el-form-item :prop="'childDataForm.'+index+'.Major'"
                  :rules="[{ required: true, message: '请输入专业', trigger: 'blur' }]"> -->
                  <el-input ref="grid_member" v-model="item.Major" class="borderless-input" placeholder="请输入专业" />
                <!-- </el-form-item> -->
              </el-descriptions-item>
              <el-descriptions-item>
                <template #label>
                  <div class="cell-item">入学时间</div>
                </template>
                <el-form-item :prop="'childDataForm.'+index+'.Start_Date'"
                  :rules="[{ required: true, message: '请选择入学时间', trigger: 'change' }]">
                  <el-date-picker v-model="item.Start_Date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
                    class="borderless-input" type="date" placeholder="请选择入学时间" size="large"></el-date-picker>
                </el-form-item>
              </el-descriptions-item>
              <el-descriptions-item>
                <template #label>
                  <div class="cell-item">毕业时间</div>
                </template>
                <el-form-item :prop="'childDataForm.'+index+'.End_Date'"
                  :rules="[{ required: true, message: '请输入专业', trigger: 'change' }]">
                  <el-date-picker v-model="item.End_Date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
                    class="borderless-input" type="date" placeholder="请选择毕业时间" size="large"></el-date-picker>
                </el-form-item>
              </el-descriptions-item>
            </el-descriptions>
          </el-form>
        </div>
      </div>
      
    </div>
    <footer class="botton-ann">
      <el-button @click="goBack">返回</el-button>
      <el-button type="primary" plain @click="handleSubmit" :loading="loading">提交</el-button>
    </footer>
  </div>
</body>
<script src="../../yl/vue.js"></script>
<script src="../../config/config.js"></script>
<script src="../../utils/compressor.js"></script>
<script src="../../utils/ID_Validity.js"></script>
<script src="../../utils/utils.js"></script>
<script src="../../utils/mixins.js"></script>
<script src="../../yl/index.js"></script>
<script src="../../yl/zh-cn.mjs"></script>
<script src="../../yl/index.iife.min.js"></script>
<script src="../../yl/jquery.min.js"></script>
<script src="../../utils/jquery.cookie.js"></script>
<script src="../../yl/jquery.easyui.min.js"></script>
<script src="../../yl/jquery.easyui.mobile.js"></script>
<script src="../../yl/moment.min.js"></script>
<script src="../../api/request.js"></script>
<script src="./js/copy.js"></script>

</html>